package com.zhangjie.servicedriveruser.service;

import com.zhangjie.internalcommon.dto.ResponseResult;
import com.zhangjie.servicedriveruser.mapper.DriverUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Auther: zj
 * @Date: 2024/3/8 - 03 - 08 - 12:19
 * @Description: com.zhangjie.servicedriveruser.service
 * @version: 1.0
 */
@Service
public class CityDriverUserService {

    @Autowired
    DriverUserMapper driverUserMapper;

    public ResponseResult<Boolean> isAvailableDriver(String cityCode) {
        int i = driverUserMapper.selectDriverUserCountByCityCode(cityCode);
        if (i > 0) {
            return ResponseResult.success(true);
        } else {
            return ResponseResult.success(false);
        }
    }
}
